#ifndef __MCCONSTRAINTVISUAL_H_
#define __MCCONSTRAINTVISUAL_H_

#include <MCGraphicsItem.h>
#include <ICanvas.h>
#include <MCConstraint.h>
#include <MCSettings.h>

class MCConstraintVisual : public MCGraphicsItem
{
public:

    MCConstraintVisual(ICanvas *presenter, MCConstraint *constraint_) :
        MCGraphicsItem(presenter),
        constraint(constraint_)
    {
        labelOffset = MCVector2(MCSettings::constraintLabelOffset);
    }

public:

    MCConstraint *constraint;

protected:

    MCVector2 labelOffset;

    QPainterPath labelBoundings(const MCPoint2D &topLeft) const
    {
        QPainterPath path;
        double size = MCSettings::LabelSize;
        QRect rect(topLeft.x, topLeft.y, size, size);
        path.addRect(rect);

        return path;
    }

};

#endif